package com.sirius.meta.mall.member.logic.controller;



import com.sirius.meta.mall.common.utils.R;
import com.sirius.meta.mall.member.logic.bean.UmsMember;
import com.sirius.meta.mall.member.logic.feign.CouponFeignService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 会员 前端控制器
 * </p>
 *
 * @author fanxioadiu
 * @since 2021-11-14
 */
@RestController
@RequestMapping("/ums/member")
public class UmsMemberController {

    @Autowired
    private CouponFeignService couponFeignService;

    @RequestMapping("/coupons")
    public R test() {
        UmsMember umsMember = new UmsMember();
        umsMember.setNickname("Surging");
        R memberCoupons = couponFeignService.memberCoupons();
        return R.ok().put("name",umsMember.getNickname()).put("coupons", memberCoupons.get("coupons"));
    }
}
